package com.heima.common.util;

import com.heima.common.dto.User;

public class AppThreadLocalUtil {
    private static ThreadLocal<User> tl = new ThreadLocal<>();

    //设置用户
    public static void set(User user) {
        tl.set(user);

    }

    //获取用户
    public static User get() {
        return tl.get();
    }

    //删除用户
    public static void remove() {
        tl.remove();
    }
}
